﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace SBPweb.Forge.Controls.Silverlight
{

    public class PageNavigator : Grid
    {

        #region Private fields

        #endregion

        #region Constructor logic

        public PageNavigator()
        {
            this.VerticalAlignment = VerticalAlignment.Top;
            this.HorizontalAlignment = HorizontalAlignment.Stretch;
            this.Margin = new Thickness(0.0);
        }

        #endregion

        #region Property accessors

        public UIElement CurrentElement
        {
            get
            {
                return base.Children[0];
            }
            set
            {
                if (base.Children.Count > 0)
                {
                    UIElement element = base.Children[0];
                    base.Children.Remove(element);
                    element = null;
                }
                base.Children.Add(value);
            }
        }

        #endregion

    }

}